
// MIT License
// 
// Copyright (c) 2009-2017 Luca Piccioni
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// 
// This file is automatically generated

#pragma warning disable 649, 1572, 1573

// ReSharper disable RedundantUsingDirective
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;

using Khronos;

// ReSharper disable CheckNamespace
// ReSharper disable InconsistentNaming
// ReSharper disable JoinDeclarationAndInitializer

namespace OpenGL
{
	public partial class Gl
	{
		/// <summary>
		/// [GL] Value of GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS symbol.
		/// </summary>
		[RequiredByFeature("GL_AMD_sparse_texture")]
		[RequiredByFeature("GL_ARB_sparse_texture", Api = "gl|glcore")]
		[RequiredByFeature("GL_EXT_sparse_texture", Api = "gles2")]
		public const int MAX_SPARSE_ARRAY_TEXTURE_LAYERS = 0x919A;

		/// <summary>
		/// [GL] Value of GL_MIN_SPARSE_LEVEL_AMD symbol.
		/// </summary>
		[RequiredByFeature("GL_AMD_sparse_texture")]
		public const int MIN_SPARSE_LEVEL_AMD = 0x919B;

		/// <summary>
		/// [GL] Value of GL_MIN_LOD_WARNING_AMD symbol.
		/// </summary>
		[RequiredByFeature("GL_AMD_sparse_texture")]
		public const int MIN_LOD_WARNING_AMD = 0x919C;

		/// <summary>
		/// [GL] Value of GL_TEXTURE_STORAGE_SPARSE_BIT_AMD symbol.
		/// </summary>
		[RequiredByFeature("GL_AMD_sparse_texture")]
		[Log(BitmaskName = "GL")]
		public const uint TEXTURE_STORAGE_SPARSE_BIT_AMD = 0x00000001;

		/// <summary>
		/// [GL] glTexStorageSparseAMD: Binding for glTexStorageSparseAMD.
		/// </summary>
		/// <param name="target">
		/// A <see cref="T:TextureTarget"/>.
		/// </param>
		/// <param name="internalFormat">
		/// A <see cref="T:InternalFormat"/>.
		/// </param>
		/// <param name="width">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="height">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="depth">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="layers">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="flags">
		/// A <see cref="T:TextureStorageMaskAMD"/>.
		/// </param>
		[RequiredByFeature("GL_AMD_sparse_texture")]
		public static void TexStorageAMD(TextureTarget target, InternalFormat internalFormat, int width, int height, int depth, int layers, TextureStorageMaskAMD flags)
		{
			Debug.Assert(Delegates.pglTexStorageSparseAMD != null, "pglTexStorageSparseAMD not implemented");
			Delegates.pglTexStorageSparseAMD((int)target, (int)internalFormat, width, height, depth, layers, (uint)flags);
			LogCommand("glTexStorageSparseAMD", null, target, internalFormat, width, height, depth, layers, flags			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glTextureStorageSparseAMD: Binding for glTextureStorageSparseAMD.
		/// </summary>
		/// <param name="texture">
		/// A <see cref="T:uint"/>.
		/// </param>
		/// <param name="target">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="internalFormat">
		/// A <see cref="T:InternalFormat"/>.
		/// </param>
		/// <param name="width">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="height">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="depth">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="layers">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="flags">
		/// A <see cref="T:TextureStorageMaskAMD"/>.
		/// </param>
		[RequiredByFeature("GL_AMD_sparse_texture")]
		public static void TextureStorageAMD(uint texture, int target, InternalFormat internalFormat, int width, int height, int depth, int layers, TextureStorageMaskAMD flags)
		{
			Debug.Assert(Delegates.pglTextureStorageSparseAMD != null, "pglTextureStorageSparseAMD not implemented");
			Delegates.pglTextureStorageSparseAMD(texture, target, (int)internalFormat, width, height, depth, layers, (uint)flags);
			LogCommand("glTextureStorageSparseAMD", null, texture, target, internalFormat, width, height, depth, layers, flags			);
			DebugCheckErrors(null);
		}

		internal static unsafe partial class Delegates
		{
			[RequiredByFeature("GL_AMD_sparse_texture")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glTexStorageSparseAMD(int target, int internalFormat, int width, int height, int depth, int layers, uint flags);

			[RequiredByFeature("GL_AMD_sparse_texture")]
			[ThreadStatic]
			internal static glTexStorageSparseAMD pglTexStorageSparseAMD;

			[RequiredByFeature("GL_AMD_sparse_texture")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glTextureStorageSparseAMD(uint texture, int target, int internalFormat, int width, int height, int depth, int layers, uint flags);

			[RequiredByFeature("GL_AMD_sparse_texture")]
			[ThreadStatic]
			internal static glTextureStorageSparseAMD pglTextureStorageSparseAMD;

		}
	}

}
